home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
bccmouse.zip
/
TEST.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-21
|
793b
|
38 lines
#include <dos.h>
#include <time.h>
#include "mouse.h"
#include <conio.h>
int
always(MouEvent &ev)
{
return 1;
}
main()
{
MouEvent ev;
textmode(LASTMODE);
clrscr();
if (mou_exists()) {
cprintf("mouse has %d buttons\r\n", mou_buttons());
mou_setusermask();
mou_setuserfunc(always);
mou_showptr();
mou_seteventmask();
while (!kbhit()) {
int n;
if (n = mou_getevent(ev)) {
cprintf("n %2d ev %04x btn %04x v %02d h %02d kb %04x clk %08lx\r",
n,ev.event,ev.buttons,ev.vertpos,ev.horzpos,ev.kbshift,
ev.ticks);
mou_refreshptr();
}
}
}
getch();
}